home *** CD-ROM | disk | FTP | other *** search
/ Zoom 2 / Zoom - Release 2 (1996)(Active Software)[!].iso / programming / amiga / visualarts / source / context / context_func.c next >
Encoding:
C/C++ Source or Header  |  1995-04-02  |  1.8 KB  |  87 lines

  1. /* C code generated by:                            */
  2. /* Visual Arts Version 2.1                        */
  3. /* Copyright (c)1994-95 Danny Y. Wong  All rights reserved        */
  4. /* Calgary, Alberta (CANADA)                                    */
  5.  
  6. extern UBYTE *ContextContextVars[];
  7. extern struct Window  *ContextWnd;
  8. extern struct Gadget *ContextGadgets[ContextNumGads];
  9. extern void CreateContextLists(void);
  10. extern UBYTE *ModelsLabels[];
  11.  
  12. struct List *ContextLists[1];
  13.  
  14. void CreateContextLists(void)
  15. {
  16.   short i;
  17.  
  18.   i=0;
  19.   while (ModelsLabels[i])
  20.      AddNewNode(ContextLists[0], ModelsLabels[i++]);
  21.  
  22. }
  23.  
  24.              /* gadget functions */
  25.  
  26. int okObj(struct VAobject VAObject)
  27. {
  28.   if (VAObject.va_Gadget->Activation & GACT_TOGGLESELECT)
  29.   {
  30.     if (VAObject.va_Gadget->Flags & GFLG_SELECTED)
  31.     ContextContextVars[0]=(UBYTE *)"1  ";
  32.     else
  33.     ContextContextVars[0]=(UBYTE *)"0  ";
  34.   }
  35.   else
  36.     ContextContextVars[0]=(UBYTE *)"2  ";
  37.   return(1L);
  38. }
  39. /*    Button  OK         */ 
  40.  
  41. int HDObj(struct VAobject VAObject)
  42. {
  43.   if (VAObject.va_Gadget->Activation & GACT_TOGGLESELECT)
  44.   {
  45.     if (VAObject.va_Gadget->Flags & GFLG_SELECTED)
  46.     ContextContextVars[1]=(UBYTE *)"1  ";
  47.     else
  48.     ContextContextVars[1]=(UBYTE *)"0  ";
  49.   }
  50.   else
  51.     ContextContextVars[1]=(UBYTE *)"2  ";
  52.   return(1L);
  53. }
  54. /*    Button  Hard Drive         */ 
  55.  
  56. int cancelObj(struct VAobject VAObject)
  57. {
  58.   if (VAObject.va_Gadget->Activation & GACT_TOGGLESELECT)
  59.   {
  60.     if (VAObject.va_Gadget->Flags & GFLG_SELECTED)
  61.     ContextContextVars[2]=(UBYTE *)"1  ";
  62.     else
  63.     ContextContextVars[2]=(UBYTE *)"0  ";
  64.   }
  65.   else
  66.     ContextContextVars[2]=(UBYTE *)"2  ";
  67.   return(1L);
  68. }
  69. /*    Button  Cancel         */ 
  70.  
  71. int cdObj(struct VAobject VAObject)
  72. {
  73.   if (VAObject.va_Gadget->Flags & GFLG_SELECTED)
  74.     ContextContextVars[3]=(UBYTE *)"1  ";
  75.   else
  76.     ContextContextVars[3]=(UBYTE *)"0  ";
  77.   return(1L);
  78. }
  79. /*    Check Box  CD-ROM         */ 
  80.  
  81. int modelObj(struct VAobject VAObject)
  82. {
  83.   return(1L);
  84. }
  85. /*    ListView           */ 
  86.  
  87.